package com.swq.java.code.utils;

import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * @author xi.yang
 * @create 2019-04-08 14:26
 **/
public class PathUtil {
    private static final String resourcePathStr = Paths.get(System.getProperty("user.dir"), "src", "main", "resources").toString();

    /**
     * 获取resources目录下面的文件路径
     * @param fileName
     * @param paths
     * @return
     */
    public static Path getResourcesFilePath(String fileName, String... paths) {
        return Paths.get(Paths.get(resourcePathStr, paths).toString(), fileName);
    }
}
